package com.shicijiaoliu.pojo;




import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import net.minidev.json.annotate.JsonIgnore;

import java.time.LocalDateTime;

@Data
public class Admin {

    @NotNull
    private long id;
    private String username;
    @JsonIgnore //返回json时忽略该属性
    private String password;
    @NotEmpty
    @Pattern(regexp = "^\\S{1,15}$") //昵称1到15位
    private String nickname;
    @Email
    private String email;
    private String userPic;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private String ruler;
    private String phone;
    private String events;
    private long age;
    private String sex;
    private String hobby;


}
